﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Xml;

namespace xml_datagrid_001
{
    public partial class MainWindow : Form
    {
        public MainWindow()
        {
            InitializeComponent();
        }

        private void loadXmlButton_Click(object sender, EventArgs e)
        {
            XmlDataDocument xml_doc = new XmlDataDocument();
            xml_doc.DataSet.ReadXml("C:\\google-svn\\cshape-svn\\xml\\xml_datagrid\\xml_datagrid_001\\xml_datagrid_001\\payment.xml");
            dataGridView1.DataSource = xml_doc.DataSet;
            dataGridView1.RowHeadersVisible = false;
            dataGridView1.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.AllCells;
            dataGridView1.AutoSizeRowsMode = DataGridViewAutoSizeRowsMode.AllCells;
            dataGridView1.DataMember = "Record";
        } 

        private void statusStrip1_ItemClicked(object sender, ToolStripItemClickedEventArgs e)
        {

        }
    }
}
